package lab01;
import java.util.Scanner;
/**
 * Created by tanfei on 2017/10/8.
 */
public class Test08 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
            System.out.println("输入一个1-100之间的整数：");
        int guessnumber = (int)(Math.random() * 100) + 1;
                while (true) {
            int result = sc.nextInt();
            if (guessnumber < result) {
                System.out.println("猜大了");
            } else if (guessnumber > result) {
                System.out.println("猜小了");
            } else {
                System.out.println("猜对了");
                break;
                     }
                                }
    }
}
